<!DOCTYPE html>
<html>
<head>
    <title>部件基础表</title>
    <#include "/header.html">
</head>
<body>
<div id="rrapp" v-cloak>
    <div v-show="showList">
        <div class="grid-btn">
            <form class="form-inline" role="form">
                <div class="form-group">
                    <a @click="reset">
                        <i class="fa fa-refresh"></i>
                    </a>
                </div>&nbsp;&nbsp;&nbsp;
                <div class="form-group">
                    <input type="text" class="form-control input-sm" v-model="q.categoryName" @keyup.enter="query"
                           placeholder="分类名称">
                </div>&nbsp;&nbsp;&nbsp;
                <div class="form-group">
                    <input type="text" class="form-control input-sm" v-model="q.partsName" @keyup.enter="query"
                           placeholder="部件名称">
                </div>&nbsp;&nbsp;&nbsp;
                <#if shiro.hasPermission("quoteParts:quoteparts:list")>
                <a class="btn btn-primary btn-sm" @click="query"><i class="fa fa-search"></i>&nbsp;查询</a>
                </#if>
            <#if shiro.hasPermission("quoteParts:quoteparts:save")>
            <a class="btn btn-primary btn-sm" @click="add"><i class="fa fa-plus"></i>&nbsp;新增</a>
            </#if>
              <#if shiro.hasPermission("quoteParts:quoteparts:update")>
           <a class="btn btn-primary btn-sm" @click="update"><i class="fa fa-pencil-square-o"></i>&nbsp;修改</a>
          </#if>
          <#if shiro.hasPermission("quoteParts:quoteparts:delete")>
           <a class="btn btn-primary btn-sm" @click="del"><i class="fa fa-trash-o"></i>&nbsp;删除</a>
           </#if>
</form>
</div>

<table id="jqGrid"></table>
<div id="jqGridPager"></div>
</div>

<div v-show="!showList" class="panel panel-default">
    <div class="panel-heading">{{title}}</div>
    <form class="form-horizontal">
        <div class="form-group">
            <div class="col-sm-2 control-label">分类id</div>
            <!--<div class="col-sm-10">-->
                <!--<input type="text" class="form-control input-sm" v-model="quoteParts.categoryId" placeholder="分类id"/>-->
            <!--</div>-->
            <div class="col-sm-10">
                <input type="text" class="form-control input-sm" v-model="quoteParts.categoryName" @click="goodsCategoryTree" readonly placeholder="一级分类"/>
                <input type="hidden" v-model="quoteParts.categoryId" name="categoryId"/>
            </div>
        </div>
        <div class="form-group">
            <div class="col-sm-2 control-label">部件名称</div>
            <div class="col-sm-10">
                <input type="text" class="form-control input-sm" v-model="quoteParts.partsName" placeholder="部件名称"/>
            </div>
        </div>
        <div class="form-group">
            <div class="col-sm-2 control-label">是否是主体</div>
            <div class="col-sm-10">
                <select class="form-control  input-sm"  v-model="quoteParts.isMainPart">
                    <option class="form-control input-sm"  value=1>是</option>
                    <option class="form-control input-sm"  value=0>否</option>
                </select>
            </div>
        </div>
        <div class="form-group">
            <div class="col-sm-2 control-label">排序</div>
            <div class="col-sm-10">
                <input type="text" class="form-control input-sm" v-model="quoteParts.partsSort" placeholder="排序"/>
            </div>
        </div>
        <div class="form-group">
            <div class="col-sm-2 control-label">是否屏蔽</div>
            <div class="col-sm-10">
                <select class="form-control  input-sm"  v-model="quoteParts.delFlag">
                    <option class="form-control input-sm"  value="true">是</option>
                    <option class="form-control input-sm"  value="false">否</option>
                </select>
            </div>
        </div>
        <div class="form-group">
            <div class="col-sm-2 control-label">是否在前端显示</div>
            <div class="col-sm-10">
                <select class="form-control  input-sm"  v-model="quoteParts.display">
                    <option class="form-control input-sm"  value="true">是</option>
                    <option class="form-control input-sm"  value="false">否</option>
                </select>
            </div>
        </div>
        <div class="form-group">
            <div class="col-sm-2 control-label">部件是否必选</div>
            <div class="col-sm-10">
                <select class="form-control  input-sm"  v-model="quoteParts.mustChoice">
                    <option class="form-control input-sm"  value="true">是</option>
                    <option class="form-control input-sm"  value="false">否</option>
                </select>
            </div>
        </div>
        <div class="form-group">
            <div class="col-sm-2 control-label">是否自来纸</div>
            <div class="col-sm-10">
                <select class="form-control  input-sm"  v-model="quoteParts.selfPaper">
                    <option class="form-control input-sm"  value="true">是</option>
                    <option class="form-control input-sm"  value="false">否</option>
                </select>
            </div>
        </div>
        <div class="form-group">
            <div class="col-sm-2 control-label">创建人员</div>
            <div class="col-sm-10">
                <input type="text" class="form-control input-sm" v-model="quoteParts.createUser" placeholder="创建人员" disabled/>
            </div>
        </div>
        <div class="form-group">
            <div class="col-sm-2 control-label">创建时间</div>
            <div class="col-sm-10">
                <input type="text" class="form-control input-sm" v-model="quoteParts.createDate" placeholder="创建时间" disabled/>
            </div>
        </div>
        <div class="form-group">
            <div class="col-sm-2 control-label">更新时间</div>
            <div class="col-sm-10">
                <input type="text" class="form-control input-sm" v-model="quoteParts.updateDate" placeholder="更新时间" disabled/>
            </div>
        </div>
        <div class="form-group">
            <div class="col-sm-2 control-label">更新人员</div>
            <div class="col-sm-10">
                <input type="text" class="form-control input-sm" v-model="quoteParts.updateUser" placeholder="更新人员" disabled/>
            </div>
        </div>
        <div class="form-group">
            <div class="col-sm-2 control-label"></div>
            <input type="button" class="btn btn-primary  btn-sm" @click="saveOrUpdate" value="确定"/>
            &nbsp;&nbsp;<input type="button" class="btn btn-warning  btn-sm" @click="reload" value="返回"/>
        </div>
    </form>
</div>
<!-- 选择分类 -->
<div id="goodsCategoryLayer" style="display: none;padding:10px;">
    <ul id="goodsCategoryTree" class="ztree"></ul>
</div>
</div>

<script src="${request.contextPath}/statics/js/modules/quoteParts/quoteparts.js?_${.now?long}"></script>
</body>
</html>